﻿// Bing Maps ASP.NEt Control is a community project available under the Microsoft Public License (Ms-PL)
// Code is provided as is and with no warrenty – Use at your own risk
// View the project and the latest code at http://BingMapsASP.codeplex.com

using System.Collections.Generic;
using System.ComponentModel;
using System.Web.UI;
using System.Web.UI.WebControls;
using Microsoft.Live.ServerControls.VE.Constants;

namespace Microsoft.Live.ServerControls.VE.Extenders
{
    [TargetControlType(typeof(WebControl))]
    public abstract class ToggleExtenderBase : ExtenderBase
    {

        /// <summary>
        /// The extender will toggle the object, turn it on or turn it off
        /// </summary>
        [Browsable(true)]
        [Category("Behaviour")]
        [DefaultValue("Toggle")]
        [Description("The extender will toggle the object")]
        public ToggleMode ToggleMode
        {
            get
            {
                if (ViewState[ExtenderControlProperty.ToggleMode] != null)
                {
                    return (ToggleMode)ViewState[ExtenderControlProperty.ToggleMode];
                }
                else
                {
                    return ToggleMode.Toggle;
                }
            }
            set
            {
                ViewState[ExtenderControlProperty.ToggleMode] = value;
            }
        }

        #region ExtenderControl Members

        protected override IEnumerable<ScriptDescriptor> GetScriptDescriptors(Control targetControl)
        {
            throw new System.NotImplementedException();
        }

        #endregion

        protected override IEnumerable<ScriptReference> GetScriptReferences()
        {
            throw new System.NotImplementedException();
        }
    }
}

